<!Doctype html>
<html data-ng-app="demoApp">
	<head>
		<title>Van Nguyen Theme</title>
		<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
		<script src="http://code.angularjs.org/1.2.7/angular.min.js"></script>
		<style>
			body{padding-top: 50px;}
		</style>
	</head>
	<body>
		<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
			<div class="container">
				<div class="navbar-header"><a class="navbar-brand">AngularJs Demo</a></div>
			</div>
		</div>
		<div class="container" data-ng-controller="SimpleController">
			<div class="panel panel-default">
				<div class="panel-heading">
					Input name
				</div>
				<div class="panel-body">
					<form class="form" role="form">
						<div class="form-group">
							<label>Name</label>
							<input class="form-control" type="text" placeholder="Name" data-ng-model="filter.name"/>
						</div>
					</form>
				</div>
			</div>
			<div class="panel panel-default">
				<div class="panel-heading">
					Display data
				</div>
				<div class="panel-body">
					<ul class="list-group">
						<li class="list-group-item" data-ng-repeat="cust in customers | filter: filter.name">{{cust.name}} - {{cust.city}}</li>
					</ul>
				</div>
			</div>
		</div>
		<script>
			var demoApp = angular.module("demoApp",[]);
			/*demoApp.config(function ($routeProvider) {
				$routeProvider
					.when("/",
						{
							controller: "SimpleController",
							templateUrl: "partials/View1.html"
						})
					.when("/partial2",
						{
							controller: "SimpleController",
							templateUrl: "partials/View2.html"
						})
					.otherwise({ redirectTo: "/"});
			});*/
			demoApp.controller("SimpleController", ["$scope", "$http", function ($scope, $http) {
				$http.get('js/customers.json').success(function(data) {
			    	$scope.customers = data;
			    });
				/*$scope.addCustomer = function () {
					$scope.customers.push({name: $scope.newCustomer.name, city: $scope.newCustomer.city});
				};*/
			}]);
		</script>
	</body>
</html>